<#include "/common/layout_dl.html">
<@header>
</@header>
<@body>
  <!-- Main content -->
  <section class="content">
    <!-- Your Page Content Here -->
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
         
          <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
              <tr>
                <th  width="100px"> 行号</th>
                <th>内容</th>
                <th>描述</th>
                <th>深度</th>
                <th>排序</th>
                <th width="150px">操作</th>
              </tr>
              <#list list as objs>
              	<#list objs as obj>
              	  <tr>
	                <td>
	                	<label>
	               		 	${(objs_index+1)!}-${(obj_index+1)!}
	                 	</label>
	               	</td>
	                <td align="left">${(obj.dvalue)!}</td>
	                <td>${(obj.desc)!}</td>
	                <td>${(obj.deep)!}</td>
	                <td>${(obj.sort)!}</td>
	                <td>
	                	 <a class="btn btn-primary btn-xs edit" href="javascript:" data-url="${base}/system/dictionary/toEditDic?id=${(obj.id)!}" data-width="800" data-height="500" data-toggle="tooltip" title="编辑字典" data-placement="bottom">编辑</a>
	                	&nbsp;&nbsp;
	                	<a class="btn btn-danger btn-xs" data-toggle="tooltip" title="删除" data-placement="bottom" data-tiggle="ajax" data-submit-url="${base}/system/dictionary/doDelDic?id=${(obj.id)!}" data-confirm="您确定要删除该条记录吗?">删除</a>
	                </td>
	              </tr>
	              </#list>
              </#list>
            </table>
          </div><!-- /.box-body -->
        </div><!-- /.box -->
      </div>
    </div>
  </section><!-- /.content -->
</@body>
<@footer>
</@footer>
<script>
 			layui.use('layer', function(){
 				var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
 				$(".edit").on("click",function(){
 	 				var url = $(this).attr('data-url');
 	 				var width = $(this).attr('data-width');
 	 				var height = $(this).attr('data-height');
 	 				var title = $(this).attr('title');
 	 				var index = parent.layer.getFrameIndex(window.name);
 	 				parent.layer.close(index);
 	 				openPage(url,width,height,url);
 	 			});
 				
 				function openPage(url,width,height,title,endUrl){
 					parent.layer.open({
 						  type: 2,
 						  area: [width+"px", height+"px"],
 						  fixed: false, //不固定
 						  maxmin: true,
 						  content: url
 						});
 				}
 			});
 	</script>